package bigdata.api.login;

import common.utils.gsonutil.GsonUtil;
import pub.user.domain.LoginResult;

/**
 * 描述:
 *
 * @author 002465
 * @created 2017/5/17 20:54
 * @return ${return_type}
 * @since v1.0.0
 * ${tags}
 */
public class LoginConvert {
    public static String toJson(LoginResult loginResult,String callBack){
        StringBuffer res = new StringBuffer(callBack)
                .append("(")
                .append(GsonUtil.create().toJson(loginResult))
                .append(")");
        return  res.toString();
    }

    public static String toJson(LoginResult loginResult){
        StringBuffer res = new StringBuffer("(")
                .append(GsonUtil.create().toJson(loginResult))
                .append(")");
        return  res.toString();
    }
}
